package cb.wzby;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

public class ListDemo1 {
    public static void main(String[] args) {
        //实例化 ArrayList

        List l1 = new ArrayList(List.of("1,java","php","css",27,18));
        //Collections l3 = new Collections();
        l1.add("ok");
        System.out.println(l1);

        //System.out.println(l3);
        System.out.println(l1.size());
        System.out.println(l1.isEmpty());
        //.isEmpty()方法判断是否为空
        System.out.println(l1.contains("ok"));
        // 建立一个集合（只读），什么对象都可以存放
        List l4 = List.of("a","Q","y",78,true);
        System.out.println(l4);

    }
}
